public class Test13 {
    public static void main(String[] args) {
        String str = "Hello, welcome to Java programming!";
        char target = 'o';
        int count = 0;
        
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == target) {
                count++;
            }
        }
        
        System.out.println("字符'" + target + "'出现的次数: " + count);
    }
}